function [locx,locy]=maxloc(x)
[a,b]=size(x);
maxi=1;
maxj=1;
for i=[1:a]
    for j=[1:b]
        if(x(i,j)>x(maxi,maxj))
            maxi=i;
            maxj=j;
        end
    end
end
locx=maxi;
locy=maxj;
end
